//package com.baidu.yyb.actiivitys;
//
//
//import android.annotation.SuppressLint;
//import android.app.KeyguardManager;
//import android.content.DialogInterface;
//import android.content.Intent;
//import android.content.SharedPreferences;
//import android.hardware.biometrics.BiometricPrompt;
//import android.hardware.fingerprint.FingerprintManager;
//import android.os.Build;
//import android.os.Bundle;
//import android.util.Log;
//import android.view.View;
//import android.webkit.WebSettings;
//import android.webkit.WebView;
//import android.widget.ImageView;
//import android.widget.TextView;
//import android.widget.Toast;
//
//import com.baidu.yyb.R;
//
///**
// * @author LiuTong
// */
//public class ActivityFingerprintIdentification extends BaseActivity {
//    private final String TAG = "Activity_fingerprint_identification";
//    private ImageView imageView;
//    private SharedPreferences msp;
//    private TextView tv;
//
//
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_fingerprint_identification);
//        setOnclick();
//        tv.setText("应用已经加锁，验证指纹后可进入主页");
//        imageView.setImageResource(R.mipmap.wallpaper4);
//
//    }
//
//
//    @Override
//    protected void onResume() {
//        super.onResume();
//        WebViewInit();
//
//
//    }
//
//
//    private void init() {
//        imageView = findViewById(R.id.img);
//        tv = findViewById(R.id.tv);
//    }
//
//    private void setOnclick() {
//        imageView.setOnClickListener(new View.OnClickListener() {
//
//            @Override
//            public void onClick(View v) {
//
//            }
//        });
//    }
//
//
//
//
//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        finish();
//    }
//
//    @SuppressLint("SetJavaScriptEnabled")
//    private void WebViewInit() {
//        WebView webView = findViewById(R.id.clock);
//        int color = getResources().getColor(R.color.clarity,getTheme());
//        webView.setBackgroundColor(color);
//        WebSettings webSettings = webView.getSettings();
//        webSettings.setJavaScriptEnabled(true);
//        webView.loadUrl("file:///android_asset/clock.html");
//
//    }
//
////    public boolean supportFingerprint() {
////        if (Build.VERSION.SDK_INT < 23) {
////            Toast.makeText(this, "您的系统版本过低，不支持指纹功能", Toast.LENGTH_SHORT).show();
////            return false;
////        } else {
////            KeyguardManager keyguardManager = getSystemService(KeyguardManager.class);
////           new BiometricPrompt.Builder(this)
////                    .setSubtitle("指纹解锁").setSubtitle("开始指纹").setDescription("描述")
////                   .setDeviceCredentialAllowed()
////                   .build();
////            FingerprintManager fingerprintManager = getSystemService(FingerprintManager.class);
////            if (!fingerprintManager.isHardwareDetected()) {
////                Toast.makeText(this, "您的手机不支持指纹功能", Toast.LENGTH_SHORT).show();
////                return false;
////            } else if (!keyguardManager.isKeyguardSecure()) {
////                Toast.makeText(this, "您还未设置锁屏，请先设置锁屏并添加一个指纹", Toast.LENGTH_SHORT).show();
////                return false;
////            } else if (!fingerprintManager.hasEnrolledFingerprints()) {
////                Toast.makeText(this, "您至少需要在系统设置中添加一个指纹", Toast.LENGTH_SHORT).show();
////                return false;
////            }
////        }
////        return true;
////    }
//
//
//
//}